
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 文件类型 1:图片 2：文件 3：视频
 * </p>
 *
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum FileTypeEnum {

    PICTURE("1", "图片","picture"),
    FILE("2", "文档","file"),
    VIDEO("3", "视频","video"),
    MUSIC("4", "音乐","music"),
    OTHER("5", "其他","other");
    private final String value;
    private final String description;
    private final String descriptionEn;

    public static FileTypeEnum find(String val) {
        for (FileTypeEnum dataScopeEnum : FileTypeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
